<!DOCTYPE html>
<html debug="true">
  <head>
    <script type="text/javascript" src="../../../../lib/externals/openlayers/lib/OpenLayers.js"></script>
    <script type="text/javascript" src="../../../../lib/externals/ext/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="../../../../lib/externals/ext/ext-all-debug.js"></script>

    <script type="text/javascript" src="../../GEOR_getfeatureinfo.js"></script>
    <script type="text/javascript">
    function test_GuessType(t) {
        t.plan(4);

        var input, o = GEOR.getfeatureinfo.FeatureDataModel.prototype;

        input = "123456789";
        type = o.guessType(input);
        t.eq(type, "int",
             "guessType("+input+") returns expected value (" + type + ")");

        input = "1234567.89";
        type = o.guessType(input);
        t.eq(type, "float",
             "guessType("+input+") returns expected value (" + type + ")");

        input = new Date();
        input.setFullYear(2009, 06, 15);
        type = o.guessType(input);
        t.eq(type, "date",
             "guessType("+input+") returns expected value (" + type + ")");

        input = "#1A2b3c4D5E6f7g8-9?";
        type = o.guessType(input);
        t.eq(type, "string",
             "guessType("+input+") returns expected value (" + type + ")");
    }
    </script>
  </head>

  <body>
    <div class="sample" id="sample_id">some text</div>
  </body>
</html>
